package com.study.model.user;
import com.baomidou.mybatisplus.annotation.*;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import lombok.Data;
import java.util.Date;

/*
* sys_menu
* 菜单表（前端可见的菜单、按钮）
* */

@Data
@TableName("sys_menu")
@Schema(description = "菜单信息表")
@Entity
public class SysMenu {
    private static final long serialVersionUID = 1L;

    @Id
    @Schema(description = "id")
    @TableId(type = IdType.AUTO)
    @org.springframework.data.annotation.Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    @Schema(description = "菜单名称")
    private String name;

    @Schema(description = "前端路径")
    private String path;

    @Schema(description = "组件名称")
    private String component;

    @Schema(description = "父级菜单ID")
    private Long parentId;

    @Schema(description = "菜单类型（0-目录，1-菜单，2-按钮）")
    private Integer type;

    @Schema(description = "图标")
    private String icon;

    @Schema(description = "排序号")
    private Integer sort;

    @Schema(description = "权限标识，对应 sys_permission.permissionCode")
    private String permissionCode;
}
